Exporting attribute contents from wizard generated Traceabilty Columns into

Hello dxl community,
It has been a long while since I used dxl and I have gone a bit rusty. I want to do a simple export of a selection of my attributes into excel. OK, from the dxl course the example "DXL_x22-simpleexport.dxl" works well for the attributes inside your module.
However I have created a view with the traceability wizard and I have new columns like "Is Validated"
So I cannot do an export as follows:

isValidated = o."IsValidated"
if (! null(isValidated)) {
file << isValidated
file << ";"
}

Technically speaking the wizard does not import attributes, it just allows you to see the data in a column.
How can I get access to the data with dxl code? Do I have to import attributes from the menu?

regards

Colm F.
MyDeveloerWorks - Thu Nov 08 09:18:03 EST 2012

Re: Exporting attribute contents from wizard generated Traceabilty Columns into
Johnny_P - Thu Nov 08 09:49:15 EST 2012

Hi,

these wizard columns are Layout DXL columns and not attributes. So you have to get a handle on the column. Then you can get the displayed value with the function: text(Column c, Object o).

Maybe you can try something like this:

Module m = //set your module
Column c = null
int iColumn = 0 //the first column in a view has position 0
 
for c in m do { //loop through all columns in your view
    if (title(c) == "IsValidated") { //if the current columns title matches leave the loop, leaving the column counter with the position of your column
                break
        }
        iColumn++
}
Column cIsValidated = column(m, iColumn) //get a handle on your column
 
string sIsValidated = text(cIsValidated, o) //get the value of your column for object o

Re: Exporting attribute contents from wizard generated Traceabilty Columns into
SystemAdmin - Thu Nov 08 10:05:50 EST 2012

You can either use the text function to get the content from your layout columns, or convert those layout columns to attibute columns containing DXL attributes, for more information on this see the DOORS Help page.

  • Pekka Mäkinen - http://www.softqa.eu/

Re: Exporting attribute contents from wizard generated Traceabilty Columns into
MyDeveloerWorks - Thu Nov 08 10:17:12 EST 2012

Johnny_P - Thu Nov 08 09:49:15 EST 2012

Hi,

these wizard columns are Layout DXL columns and not attributes. So you have to get a handle on the column. Then you can get the displayed value with the function: text(Column c, Object o).

Maybe you can try something like this:

Module m = //set your module
Column c = null
int iColumn = 0 //the first column in a view has position 0
 
for c in m do { //loop through all columns in your view
    if (title(c) == "IsValidated") { //if the current columns title matches leave the loop, leaving the column counter with the position of your column
                break
        }
        iColumn++
}
Column cIsValidated = column(m, iColumn) //get a handle on your column
 
string sIsValidated = text(cIsValidated, o) //get the value of your column for object o

Thank you Johnny, that works. It is a better alternative to the one I had thought of which was to convert the layout attributes to dxl attributes.

Best regards

Colm